Getting started

Adding DataObjects.Net to your projects

  1. Open NuGet Package Manager for the project and search for DataObjects.Net:
_images/NuGet.png
  1. Install DataObjects.Net package.

    The package will automatically install all dependencies and DataObjects.Net.

  2. Install desired data providers.

    Core package does not contain any providers. So install package for the provider (or providers) you are going to use.

  3. Install DataObjects.Net extensions (optional).

    Extensions are small projects that extend standard functionality of DataObjects.Net.

Under the hood

For a project to be a valid DataObjects.Net project, it should meet some specific requirements. NuGet packages apply the required changes to project files on the fly during the installation.

Anyway, here are the requirements so you can get familiar with them:

  1. Project must reference Xtensive.Orm assembly and a specific database provider (e.g. Xtensive.Orm.Oracle).

  2. Project should import DataObjects.Net.targets file. The file contains a bunch of MSBuild tasks that are executed during project build process.

    As NuGet packages are installed to a spectial directory for all packages (e.g. for Windows it might be C:\Users\<user name>\.nuget\packages, MSBuild has built-in variable for it) import directive usually looks like this:

    <Import Project=”$(NuGetPackageRoot)xtensive.orm7.1.0buildnet5Xtensive.Orm.targets” />

    or

    <Import Project=”$(NuGetPackageRoot)xtensive.orm7.1.0buildnet6Xtensive.Orm.targets” />

    All imports are gathered in one generated *.targets file in the obj folder.